Graphics3D 640 , 480 , 16 , 2
HidePointer()

WireFrame 0

Include "Weather.bb"
Include "WeatherFunctions.bb"

Global Camera = CreateCamera()
CameraClsColor Camera , 0 , 0 , 0
PositionEntity Camera , 0 , 50 , 128

Global wea . Weather = CreateWeather( Camera )

While Not KeyHit( 1 )
	
	If Keydown(200) Then	
		MoveEntity Camera , 0 , 0 , .1
	EndIf	
	If Keydown(203) Then	
		TurnEntity Camera , 0 , .5 , 0
	EndIf	
	If Keydown(205) Then	
		TurnEntity Camera , 0 , -.5 , 0
	EndIf
	If Keydown(208) Then	
		MoveEntity Camera , 0 , 0 , -.1
	EndIf
	
	If KeyHit ( 2 ) Then wea \ Name$ = "GlowingAir"
	If KeyHit ( 3 ) Then wea \ Name$ = "Rain"
	If KeyHit ( 4 ) Then wea \ Name$ = "Snow"
	If KeyHit ( 5 ) Then wea \ Name$ = "Wind"
	If KeyHit ( 6 ) Then wea \ Name$ = "NatureBalls"
	If KeyHit ( 7 ) Then wea \ Name$ = "Mist"
	If KeyHit ( 8 ) Then wea \ Name$ = "Hail"
	
	If KeyHit ( 49 ) Then wea \ amount = wea \ amount - 1
	If KeyHit ( 50 ) Then wea \ amount = wea \ amount + 1

	UpdatePatterns( wea )

	RenderWorld
	
	Text 0 , 0 , "Hit 1 - 7 For another Weather."
	Text 0 , 20 , "Current Weather: " + wea \ Name$
	Text 0 , 40 , "Hit N or M For more/less weather"
	Text 0 , 60 , "Current Weather Amount: " + wea \ amount
	
	Flip

Wend